package 设计原则.迪米特原则;

public class TeamLeader implements Manager{
    private  Programmer programmer;


    public void setProgrammer(Programmer programmer) {
        this.programmer = programmer;
    }

    public void assigTask() {
        System.out.println("分配工作");
        if(programmer instanceof JavaProgrammer){
            programmer.work();
        }else if(programmer instanceof PythonProgrammer){
            programmer.work();

        }

    }
}
